﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Decoretor
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            RobotBase robot = new RobotBase();
            robot.MoveJ("抓取点", "放置点");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            ///带记录的移动
            IMoveable robot = new DecoretorRobotRecord(new ConsoleRecoreder(),new RobotBase());
            robot.MoveJ("抓取点", "放置点");
        }

        private void button2_Click(object sender, EventArgs e)
        {
        IMoveable robot = new RobotBase();
            Console.WriteLine("开始抓取******");
            robot.MoveJ("抓取点", "放置点");
            Console.WriteLine("放置完成******");
        }
      

        private void button4_Click(object sender, EventArgs e)
        {
            //带记录带报警的移动
            IMoveable robot = new DecoretorRobotAlarm(new DecoretorRobotRecord(new ConsoleRecoreder(), new RobotBase()));
            robot.MoveJ("抓取点", "放置点");
        }
    }
}
